home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_u_z / wt_jan92.zip / DPMI.ZIP / UNETBIOS.PAS < prev    next >
Pascal/Delphi Source File  |  1991-12-23  |  3KB  |  77 lines

  1. UNETBIOS.PAS - Interface unit for WNETBIOS.DLL
  2. {*********************************************************}
  3. {*                 UNETBIOS.PAS 1.00                     *}
  4. {*        Copyright (c) TurboPower Software 1991.        *}
  5. {*                 All rights reserved.                  *}
  6. {*********************************************************}
  7. {$S-,R-}
  8. unit UNetBios;
  9.   {-A unit to access the routines exported by the DLL WNETBIOS}
  10. interface
  11.  
  12. uses WinDPMI, TNetBios;
  13.  
  14. function GetWindowsPostRoutine(ProtectedProc : NetBiosPostRoutine;
  15.                                DataSegment : Word;
  16.                                var WinPost : WindowsPostType) : Boolean;
  17.   {-Allocate a post routine and initialize a WindowsPostType variable}
  18.  
  19. procedure FreeWindowsPostRoutine(var WinPost : WindowsPostType);
  20.   {-Free a WindowsPostType previously initialized with GetWindowsPostRoutine}
  21.  
  22. procedure SendDataGram(var N : WinNCB; SenderNameNum : Byte;
  23.                        ReceiverName : NBNameStr;
  24.                        Wait : Boolean;
  25.                        var PostEvent : WindowsPostType;
  26.                        DGSize : Word;
  27.                        Datagram : Pointer);
  28.   {-Send a data packet via datagram services. If Wait is TRUE, then this
  29.     routine will wait until a datagram is sent before returning. The
  30.     CmdCompleted field of the NCB reports when the event is complete if Wait
  31.     is FALSE.}
  32.  
  33. procedure ReceiveDataGram(var N : WinNCB;
  34.                           ReceiverNameNum : Byte;
  35.                           Wait : Boolean;
  36.                           var PostEvent : WindowsPostType;
  37.                           DGSize : Word;
  38.                           Datagram : Pointer);
  39.   {-Receive a data packet via datagram services. If Wait is TRUE, then this
  40.     routine will wait until a datagram is received before returning.
  41.     Otherwise, it waits for the datagram in the background. The CmdCompleted
  42.     field of the NCB reports when the event is complete if Wait is FALSE.}
  43.  
  44. function NetBIOSInstalled : Boolean;
  45.   {-returns true if NetBIOS (or a NetBIOS emulator) is installed}
  46.  
  47. function CancelRequest(var N : WinNCB) : Byte;
  48.   {-cancels a pending NetBIOS function request}
  49.  
  50. function NetBiosAddName(NameToAdd : NBNameStr;
  51.                         var NameNumber : Byte) : Byte;
  52.   {-Adds a NetBIOS unique name to the name table}
  53.  
  54. function NetBiosDeleteName(NameToDelete : NBNameStr) : Byte;
  55.   {-deletes a name or group name from the NetBIOS name table}
  56.  
  57. function AllocateWinNCB(var N : WinNCB) : Boolean;
  58.   {-Allocates memory for an NCB and maintains a real and protected mode ptr}
  59.  
  60. procedure FreeWinNCB(N : WinNCB);
  61.   {-Frees a WinNCB previously allocated with AllocateWinNCB}
  62.  
  63. implementation
  64.  
  65. function GetWindowsPostRoutine;         external 'WNetBIOS' index 1;
  66. procedure FreeWindowsPostRoutine;       external 'WNetBIOS' index 2;
  67. procedure SendDatagram;                 external 'WNetBIOS' index 3;
  68. procedure ReceiveDatagram;              external 'WNetBIOS' index 4;
  69. function NetBiosInstalled;              external 'WNetBIOS' index 5;
  70. function CancelRequest;                 external 'WNetBIOS' index 6;
  71. function NetBiosAddName;                external 'WNetBIOS' index 7;
  72. function NetBiosDeleteName;             external 'WNetBIOS' index 8;
  73. function AllocateWinNCB;                external 'WNetBIOS' index 9;
  74. procedure FreeWinNCB;                   external 'WNetBIOS' index 10;
  75.  
  76. end.
  77.